﻿using SocketHelper;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

namespace SocketClient
{
    class Program
    {
        private static string ip = System.Configuration.ConfigurationManager.AppSettings["RemoteIP"];
        private static int port = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["RemotePort"]);
        private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Common.ConsoleM("请输入命令");
                logger.Debug("test");
                while (true)
                {
                    string command = Console.ReadLine();
                    AnalysisCommand.sendCommand(command, args);
                }
            }
            else
            {
                ip = args[0];
                port = Convert.ToInt32(args[1]);
                AnalysisCommand.sendCommand("file", args);
            }
            
        }

        
    }
}
